package com.asset.dispoal.interestFormula.domain.service;

import com.asset.dispoal.interestFormula.api.InterestFormulaService;
import com.asset.dispoal.interestFormula.domain.service.commom.InterestFormulaDelCommand;
import com.asset.dispoal.interestFormula.domain.service.commom.InterestFormulaInsertCommand;
import com.asset.dispoal.interestFormula.domain.service.commom.InterestFormulaQueryPageCommand;
import com.asset.dispoal.interestFormula.domain.service.commom.InterestFormulaUpdateCommand;
import com.asset.dispoal.interestFormula.dto.InterestFormulaRequest;
import com.asset.dispoal.interestFormula.dto.InterestFormulaResponse;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import tech.mhuang.pacebox.springboot.protocol.Result;
import tech.mhuang.pacebox.springboot.protocol.data.PageVO;


/**
 * @author qr
 * @date 2022/3/28$
 */
@Service
public class InterestFormulaServiceImpl implements InterestFormulaService {

    @Autowired
    InterestFormulaQueryPageCommand interestFormulaQueryPageCommand;
    @Autowired
    InterestFormulaDelCommand interestFormulaDelCommand;
    @Autowired
    InterestFormulaInsertCommand interestFormulaInsertCommand;
    @Autowired
    InterestFormulaUpdateCommand interestFormulaUpdateCommand;

    @Override
    public void insert(InterestFormulaRequest request) {
        interestFormulaInsertCommand.execute(request);
    }

    @Override
    public void update(InterestFormulaRequest request) {
        interestFormulaUpdateCommand.execute(request);
    }

    @Override
    public void delete(String id) {
        interestFormulaDelCommand.execute(id);
    }

    @Override
    public Result<PageVO<InterestFormulaResponse>> queryPage(InterestFormulaRequest request) {
        return interestFormulaQueryPageCommand.execute(request);
    }
}
